package pers.course.week3;

import java.util.Scanner;

public class DigitCount {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int num = in.nextInt();
        int[] number = new int[num];
        String[] numbers = new String[num];
        for (int i = 0; i < num; i++) {
            if (in.hasNext()) {
                number[i] = in.nextInt();
            }
        }
        for (int j = 0; j < num; j++) {
            numbers[j] = Integer.toString(number[j]);
            System.out.println(numbers[j].length());
        }
    }
}
